package com.yuanlrc.hotel.home;

import com.yuanlrc.hotel.about.domain.About;
import com.yuanlrc.hotel.about.service.IAboutService;
import com.yuanlrc.hotel.service.domain.AboutService;
import com.yuanlrc.hotel.service.service.IAboutServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/home/index")
public class HomeAboutController {
    @Autowired
    private IAboutService aboutService;
    @Autowired
    private IAboutServiceService service;
    /**
     * 酒店关于也页面跳转
     *
     * @return
     */
    @RequestMapping("/about")
    public String about(Model model){
        About about = aboutService.selectOneAbout();
        model.addAttribute("about",about);
        model.addAttribute("serviceList",service.selectAboutServiceList(new AboutService()));
        model.addAttribute("service",service.selectOneAboutService());
        return "home/index/about";
    }
}
